.spacingLoop (@i) when (@i > 0) {
    .p-@{i} {
        padding: @i * 1px;
    }
    .p-t-@{i} {
        padding-top: @i * 1px;
    }
    .p-r-@{i} {
        padding-right: @i * 1px;
    }
    .p-b-@{i} {
        padding-bottom: @i * 1px;
    }
    .p-l-@{i} {
        padding-left: @i * 1px;
    }
    .m-t-@{i} {
        margin-top: @i * 1px;
    }
    .m-r-@{i} {
        margin-right: @i * 1px;
    }
    .m-b-@{i} {
        margin-bottom: @i * 1px;
    }
    .m-l-@{i} {
        margin-left: @i * 1px;
    }
       
    .spacingLoop((@i - 1));
}

.spacingLoop(60);